#!/usr/bin/env bash

# 安装zsh
apt-get install zsh
# 安装Oh-My-Zsh
# sh -c "$(curl -fsSL https://gitee.com/mirrors/oh-my-zsh/raw/master/tools/install.sh);"
# sh -c "$(wget -O- https://gitee.com/mirrors/oh-my-zsh/raw/master/tools/install.sh)" 
sh -c "$(wget -O- https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
# 安装p10k
#git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k
git clone --depth=1 https://gitee.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k

# 设置默认shell
chsh -s /bin/zsh
# 如果是windows,在{Git的安装目录位置}/etc/bash.bashrc文件末尾追加以下内容：
# Launch Zsh
# if [ -t 1 ]; then
# exec zsh
# fi
echo 'zsh install complete!!!'
echo '============================================================================='
echo 'vim ~/.zshrc -> ZSH_THEME="powerlevel10k/powerlevel10k" -> $ p10k configure'
echo 'git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions'
echo 'git clone https://github.com/zsh-users/zsh-autosuggestions ~/.oh-my-zsh/custom/plugins/zsh-autosuggestions'
echo 'git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ~/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting'
echo 'plugins=(git zsh-autosuggestions zsh-syntax-highlighting)'
echo '============================================================================='